from pydantic import BaseModel, Field
from typing import Optional

from decimal import Decimal


class CaseQcQuery(BaseModel):
    page: int = Field(1, ge=1, description="页码", alias="current")
    size: int = Field(10, ge=1, le=100, description="每页数量")

    id: Optional[int] = Field(None, description="按 序号 过滤")
    case_id: Optional[int] = Field(None, description="按 案情id 过滤")
    project_id: Optional[int] = Field(None, description="按 项目id 过滤")
    qctype: Optional[str] = Field(None, description="按 案情质量类型 字符串模糊匹配")
    qcseq: Optional[str] = Field(None, description="按 案情质量序号 字符串模糊匹配")
    name: Optional[str] = Field(None, description="按 案情质量名称 字符串模糊匹配")
    sort: Optional[int] = Field(None, description="按 排序 过滤")
    options: Optional[str] = Field(None, description="按 选项 默认N 选择Y/N 字符串模糊匹配")
    score: Optional[Decimal] = Field(None, description="按 得分 默认0 过滤")
    created_by: Optional[str] = Field(None, description="按 创建人 字符串模糊匹配")
    created_dept: Optional[str] = Field(None, description="按 创建部门 字符串模糊匹配")
    remark: Optional[str] = Field(None, description="按 备注说明 字符串模糊匹配")

